package com.example.entity;

import com.example.annotations.Length;
import com.example.annotations.NotNull;
import com.example.annotations.Phone;

/**
 * 学生类
 * @Author: chen
 * @CreateTime: 2022-08-16
 * @Version: 1.0
 */
public class Student {
    // 姓名
    @NotNull
    private String name;
    // 手机号
    @Phone
    private String phone;
    // 密码
    @Length(value = "密码至少6位",length = 6)
    private String password;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("Student{");
        sb.append("name='").append(name).append('\'');
        sb.append(", phone='").append(phone).append('\'');
        sb.append(", password='").append(password).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
